package com.hzqx.xxzx.project.controller;


import com.hzqx.xxzx.common.utils.result.Result;
import com.hzqx.xxzx.common.utils.result.ResultBuilder;
import com.hzqx.xxzx.framework.annotation.SysLog;
import com.hzqx.xxzx.project.service.SysMenuService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * <p>
 * 权限表 前端控制器
 * </p>
 *
 * @author ZY
 * @since 2020-09-24
 */
@RestController
@RequestMapping("/sysMenu")
public class SysMenuController {

    private final SysMenuService sysMenuService;

    public SysMenuController(SysMenuService sysMenuService) {
        this.sysMenuService = sysMenuService;
    }
    @SysLog
    @GetMapping("/list")
    public Result<Object> getData(HttpServletRequest request){
        HttpSession session = request.getSession();
        session.setAttribute("name", "haixiang");
        return ResultBuilder.success(sysMenuService.list());
    }
}
